/* 
 * File:   StringConverters.cpp
 * Author: Timothy Sassone
 * 
 * Created on September 20, 2012, 1:51 PM
 */

#include "StringConverters.hpp"

#include<string>
#include<sstream>

string int_to_string(int i)
{
    string s;
    stringstream out;
    out << i;
    s = out.str();
    return s;
}

string float_to_string(float f)
{    
    string s;
    stringstream out;
    out << f;
    s = out.str();
    return s;
}

string bool_to_string(bool b)
{
    if(b) return "true";
    else return "false";
}

bool string_to_bool(string s)
{
    if(s=="true") return true;
    else return false;
}